package cn.jhz.learn.blog.dao.photo;

import java.util.List;
import java.util.Set;

import cn.jhz.learn.blog.po.photo.BlogPhoto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface BlogPhotoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(BlogPhoto record);

    int insertSelective(BlogPhoto record);

    BlogPhoto selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BlogPhoto record);

    int updateByPrimaryKey(BlogPhoto record);

    /*自定义*/

    int batchInsertSelective(@Param("photoList") List<BlogPhoto> photoList);

	int countExistByIdAndBlogId(Integer photoId, Integer id);

	int batchUpdateStatusByIdSet(@Param("idSet") Set<Integer> idSet, Byte status);

	int batchUpdateByPrimaryKeySelective(@Param("photoList") List<BlogPhoto> photoList);

}